<?php
use doumiaoduo\buildform\BuildFormElement;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use zhtfrontend\assets\AppAsset;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <?= Html::csrfMetaTags() ?>
    <?php $this->head() ?>
</head>
<body class='zx-dialog-bg'>
<?php $this->beginBody() ?>
    <?php $form = ActiveForm::begin(['id' => $form_config['id'],'enableClientValidation'=>$form_config['enableClientValidation'],'enableAjaxValidation'=>$form_config['enableAjaxValidation'],'options'=>$form_config['options']]);?>
    <?php foreach($form_config['models'] as $k=>$v){?>
        <?php foreach($v['elements'] as $ek=>$e){ ?>
    <div class="yx-clear">
        <label class="zx-label"><?=BuildFormElement::label($form_config,$k,$ek);?></label>
        <div class="zx-field-floatl">
            <?=BuildFormElement::field($form,$form_config,$k,$ek);?>
        </div>
    </div>
        <?php } ?>
    <?php } ?>
    <div style="display: none"><?= Html::submitButton('保存', ['id'=>'dosubmit','class'=>"btn yx-save yx-radius50"]) ?></div>
    <?php ActiveForm::end(); ?>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>

